#include<iostream>
using namespace std;
typedef long long LL;
const int N = 1e6 + 10;
int a[N];
int cnt[N];
bool st[N];
int prices[N];
int cnt_1 = 0;
int n;
int gcd(int a, int b)
{
	return b ? gcd(b, a % b) : a;
}

void fun(int x)
{
	for (int i = 2; i <= x; i++) {
		if (!st[i])prices[++cnt_1] = i;
		for (int j = 1; prices[j] <= n / i; j++) {
			st[prices[j] * i] = 1;
			if (i % prices[j] == 0)break;
		}
	}
}

void fun1(int x)
{
	for (int i = 2; i * i <= x; i++) {
		if (x % i == 0) {
			while (x % i == 0) {
				x /= i;
			}
			cnt[i]++;
		}
	}
	if (x > 1) {
		cnt[x]++;
	}
}
int main()
{
	cin >> n;
	int d = 0;
	for (int i = 1; i <= n; i++) {
		scanf_s("%d", &a[i]);
		d = gcd(d, a[i]);
	}	
	if (d != 1)cout << "not coprime" << endl;
	else {
		for (int i = 1; i <= n; i++) {
			fun1(a[i]);
		}
		for (int i = 2; i <= 1e6; i++) {
			if (cnt[i] >= 2) {
				cout << "setwise coprime" << endl;
				return 0;
			}
		}
		cout << "pairwise coprime" << endl;
	}
	return 0;
}